home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / intro.g < prev    next >
Text File  |  1995-05-04  |  4KB  |  169 lines

  1. (game-module "intro"
  2.   (title "Introductory Game")
  3.   (blurb "An introduction to Xconq; your goal is to explore and take over the world.")
  4.   ;; no variants, this is just a basic game.
  5. )
  6.  
  7. (unit-type infantry (image-name "soldiers"))
  8. (unit-type armor (image-name "tank"))
  9. (unit-type transport (image-name "ap"))
  10. (unit-type battleship (image-name "bb"))
  11. (unit-type base (image-name "airbase") (char "/"))
  12. (unit-type city (image-name "city20") (char "@"))
  13.  
  14. (terrain-type sea (color "sky blue") (char "."))
  15. (terrain-type land (image-name "plains") (color "green") (char "+"))
  16. (terrain-type mountains (color "sienna") (char "^"))
  17.  
  18. ;;; Static relationships.
  19.  
  20. (table vanishes-on
  21.   ((infantry armor base city) sea true)
  22.   ((transport battleship) (land mountains) true)
  23. )
  24.  
  25. (add (transport base city) capacity (6 6 24))
  26.  
  27. (table unit-size-as-occupant
  28.   (u* u* 99)
  29.   ((infantry armor) transport 1)
  30.   ((infantry armor) (base city) 1)
  31.   ((transport battleship) city (3 6))
  32.   )
  33.  
  34. ;;; Actions.
  35.  
  36. (add u* acp-per-turn (1 2 2 4 0 1))
  37.  
  38. ;;; Movement.
  39.  
  40. (add (base city) speed 0)
  41.  
  42. (table mp-to-enter-terrain
  43.   ((infantry armor) sea 99)  ; cheap accidental drowning prevention
  44.   ((transport battleship) (land mountains) 99)
  45.   )
  46.  
  47. (table mp-to-leave-terrain
  48.   (armor mountains 1)
  49.   )
  50.  
  51. ;;; Construction.
  52.  
  53. (add u* cp (4 6 12 30 6 1))
  54.  
  55. (table acp-to-create
  56.   (city (infantry armor transport battleship) 1)
  57.   (infantry base 1)
  58.   )
  59.  
  60. (table cp-on-creation
  61.   (city (infantry armor transport battleship) 1)
  62.   (infantry base 1)
  63.   )
  64.  
  65. (table acp-to-build
  66.   (city (infantry armor transport battleship) 1)
  67.   (infantry base 1)
  68.   )
  69.  
  70. (table cp-per-build
  71.   (city (infantry armor transport battleship) 1)
  72.   (infantry base 1)
  73.   )
  74.  
  75. ;;; Combat.
  76.  
  77. (add u* hp-max (2 2 1 4 10 40))
  78.  
  79. (table hit-chance
  80.   (infantry u* (50 30 20 10 30 50))
  81.   (armor u* (70 70 40 20 50 100))
  82.   (battleship u* 100)
  83.   )
  84.  
  85. (table damage
  86.   (u* u* 1)
  87.   (armor armor 1)
  88.   (armor city 1)
  89.   (battleship armor 1)
  90.   )
  91.  
  92. (table capture-chance
  93.   (infantry (base city) (50 50))
  94.   (armor (base city) (90 70))
  95.   ;; As a special case, infantry can sometimes capture armor.
  96.   (infantry armor 10)
  97.   )
  98.  
  99. ;;; Initialization parameters.
  100.  
  101. (add t* alt-percentile-min (  0  60  90))
  102. (add t* alt-percentile-max ( 60  90 100))
  103. (add t* wet-percentile-min (  0   0   0))
  104. (add t* wet-percentile-max (100 100 100))
  105.  
  106. (add (sea land) country-terrain-min (1 7))
  107. (add city start-with 1)
  108. (add city independent-near-start 3)
  109. (set country-radius-min 3)
  110. ;; Countries are close together so beginners can find the enemy easily.
  111. (set country-separation-min 6)
  112. (set country-separation-max 8)
  113.  
  114. (table independent-density
  115.   (city (land mountains) (200 20))
  116.   )
  117.  
  118. (table favored-terrain
  119.   (u* t* 0)
  120.   ((infantry armor) land 100)
  121.   (city (land mountains) (100 10))
  122.   )
  123.  
  124. (include "ng-weird")
  125. (add city namer "short-generic-names")
  126.  
  127. (world 120) ; cylinder maps are screwed up, avoid them for now
  128.  
  129. ;; Fixed area, easier to play on.
  130.  
  131. (area 40 20)
  132.  
  133. ;; Wire to exactly two players, no options.
  134.  
  135. (side 1 (noun "human"))
  136.  
  137. (side 2 (noun "robot"))
  138.  
  139. (set sides-min 2)
  140. (set sides-max 2)
  141.  
  142. ;; This is just a simple "take over the world", easier to explain.
  143.  
  144. (scorekeeper (do last-side-wins))
  145.  
  146. ;; Only cities count.
  147.  
  148. (add u* point-value 0)
  149. (add u* point-value 1)
  150.  
  151. (game-module (instructions (
  152.   "This game is an introduction to Xconq."
  153.   ""
  154.   "You start with one city and try to expand throughout the world."
  155.   "Eventually you will encounter the evil robots, and must do battle"
  156.   "with them."
  157.   ""
  158.   "To get things going, use your first infantry to explore around."
  159.   ""
  160.   "You should try to capture independent cities and set them to"
  161.   "building also, either infantry or armor.  Armor moves faster,"
  162.   "but also takes longer to build."
  163.   ""
  164.   "When you find the bad guys, try to capture their cities.  There may"
  165.   "be a lot of these, so search carefully.  They may also have armies secretly"
  166.   "in reserve - watch out for surprise invasions!"
  167. )))
  168.  
  169.